

public class NurseryDTO {
	private static final String APPEND_STR= ", ";
	///
	/// Attributes
	///
	private int parents = -1;
	private int has_nurs = -1;
	private int form = -1;
	private int children = -1;
	private int housing = -1;
	private int finance = -1;
	private int social = -1;
	private int health = -1;
	private int classification = -1;

	public int getParents() {
		return parents;
	}
	public void setParents(int parents) {
		this.parents = parents;
	}
	public int getHas_nurs() {
		return has_nurs;
	}
	public void setHas_nurs(int has_nurs) {
		this.has_nurs = has_nurs;
	}
	public int getForm() {
		return form;
	}
	public void setForm(int form) {
		this.form = form;
	}
	public int getChildren() {
		return children;
	}
	public void setChildren(int children) {
		this.children = children;
	}
	public int getHousing() {
		return housing;
	}
	public void setHousing(int housing) {
		this.housing = housing;
	}
	public int getFinance() {
		return finance;
	}
	public void setFinance(int finance) {
		this.finance = finance;
	}
	public int getSocial() {
		return social;
	}
	public void setSocial(int social) {
		this.social = social;
	}
	public int getHealth() {
		return health;
	}
	public void setHealth(int health) {
		this.health = health;
	}
	public int getClassification() {
		return classification;
	}
	public void setClassification(int classification) {
		this.classification = classification;
	}

	public boolean isValid(){
		return this.parents != -1
				&& this.has_nurs != -1
				&& this.form != -1
				&& this.children != -1
				&& this.housing != -1
				&& this.finance != -1
				&& this.social != -1
				&& this.health  != -1
				&& this.classification != -1;
	}

	@Override
	public boolean equals(Object obj) {
		if(obj instanceof NurseryDTO) {
			NurseryDTO dto = (NurseryDTO)obj;
			return this.parents == dto.getParents()
					&& this.has_nurs == dto.getHas_nurs()
					&& this.form == dto.getForm()
					&& this.children == dto.getChildren()
					&& this.housing == dto.getHousing()
					&& this.finance == dto.getFinance()
					&& this.social == dto.getSocial()
					&& this.health == dto.getHas_nurs()
					&&  this.classification == dto.getClassification();

		}

		return false;
	}
	@Override
	public String toString(){ 
		return parents + APPEND_STR 
				+ has_nurs + APPEND_STR 
				+ form + APPEND_STR 
				+ children + APPEND_STR 
				+ housing + APPEND_STR 
				+ finance + APPEND_STR 
				+ social + APPEND_STR 
				+ health + APPEND_STR 
				+ classification + "\n";

	}
}
